import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/home"
  },
  {
    path: "/",
    name: "ExportNav",
    component: () => import('@/views/exportnav.vue'),
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import('@/pages/home.vue'),
      },
      {
        path: "overview",
        name: "Overview",
        component: () => import('@/pages/overview.vue'),
      },
      {
        path: "dianqi",
        name: "DianQi",
        component: () => import('@/pages/dianqi.vue'),
      },
      {
        path: "brand",
        name: "Brand",
        component: () => import('@/pages/brand.vue'),
      },
      {
        path: "dealer",
        name: "Dealer",
        component: () => import('@/pages/dealer.vue'),
      },
      {
        path: "drive",
        name: "Drive",
        component: () => import('@/pages/drive.vue'),
      },
      {
        path: "news",
        name: "News",
        component: () => import('@/pages/news.vue'),
      },
      {
        path: "performance",
        name: "Performance",
        component: () => import('@/pages/performance.vue'),
      },
      {
        path: "service",
        name: "Service",
        component: () => import('@/pages/service.vue'),
      },
      {
        path: "car",
        name: "Car",
        component: () => import('@/pages/car.vue'),
      },
      {
        path: "jisuanqi",
        name: "JiSuanQi",
        component: () => import('@/pages/jisuanqi.vue'),
      },
    ]
  }
]

const router = new VueRouter({
  routes,
  scrollBehavior(to,from,savedPosition){
    return {x:0,y:0}
  }
})

export default router
